package tjs.study.notes.cloudconfigclient;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.core.env.Environment;

@SpringBootApplication
public class CloudConfigClientApplication implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(CloudConfigClientApplication.class, args);
    }

    @Autowired
    private Environment environment;


    @Override
    public void run(String... args) throws Exception {
        System.out.println(environment.getProperty("foo"));
    }
}
